1. Field of the invention
The present invention relates to semiconductor devices and methods of controlling the semiconductor devices, and more particularly, to a semiconductor device that has a protecting function against rewrite, and a method of controlling the semiconductor device.
2. Description of the Related Art
As flash memories for storing data, NAND-type memories and AND-type memories are well known. Japanese Unexamined Patent Publication No. 2001-308209 and Japanese Laid-Open Patent Publication No. 2001-518696 disclose examples of NAND flash memories that have floating gates (FG) as charge accumulation layers.
FIG. 1 illustrates the array structure of a conventional FG-type NAND flash memory. In FIG. 1, WL000 through WL031 are word lines that are provided for each unit block, BLn are bit lines, and M are memory cells. The bit lines BLn are connected to page buffers 100 through 10n. Every thirty two of the memory cells M are connected in series, so as to form a memory cell array for each bit line BLn by the block. One end of each of the memory cell arrays M000 through M031, . . . , and Mn00 through Mn31 is connected to an array Vss line ARVSS via select source gate SSG00 through SSG0n that respond to the potential of a select line SSG0. The other end of each of the memory cell arrays M000 through M031, . . . , and Mn00 through Mn31 is connected to the bit lines BL0 through BLn via select drain gates SDG00 through SDG0n and drain contacts 220 through 22n that respond to the potential of a select line SDG0. Through select gate control based on an address signal, a desired block is selected, and the other blocks remain unselected.
FIG. 2A is a cross-sectional view of a cell of a FG-type NAND flash memory. FIG. 2B is a cross-sectional view of a select gate. As shown in FIG. 2A, the memory cell M has a structure in which a tunnel oxide film 32, a polycrystalline silicon floating gate 33, an oxide film 34, a nitride film 35, an oxide film 36, and a control gate 37 are stacked in this order on a silicon substrate 31. The threshold value of a FG-type NAND flash memory is set to a negative value in an erasing state (data 1), and is set to a positive value in a writing state (data 0). As shown in FIG. 2B, the select gates SSG and SDG each have a structure in which an oxide film 42 and a gate electrode 43 are stacked in this order on a silicon substrate 41.
In recent years, SONOS (semiconductor-oxide-nitride-oxide-semiconductor)-type NAND flash memories have been developed. In a SONOS-type NAND flash memory, information is stored using a nitride film as a charge accumulation layer, instead of a floating gate. This technique is disclosed in Japanese Unexamined Patent Publication No. 2003-204000. In a SONOS-type non-volatile semiconductor memory, charge injection into a gate insulating film is performed from the source side or the drain side, so that multi-value information can be stored.
Also, in a conventional NAND flash memory, a protecting function against rewrite is provided to prevent the data in the memory cells from being rewritten through a false operation of the chip when the power supply is turned on or off. As a LOW-level signal is supplied to a /WP terminal from the outside, this function inactivates the rewrite circuit (such as a high-voltage generating circuit), thereby prohibiting rewrite in all the cells in the chip.
Meanwhile, a NOR flash memory that is used for storing codes has a function that provides protection against rewrite for each block (sector) unit. In this structure, a protection storing unit (such as a CAM or a latch circuit) for setting protection information against rewrite is provided in a different region from the memory array. When a rewrite instruction is input from the outside, the state machine refers to the data in the protection storing unit corresponding to the block to be rewritten, and performs rewrite or prohibits rewrite in accordance with the data.
In NAND flash memories, there are cases where secret data or code data (programs) are stored in predetermined blocks, and are used when necessary. In such cases, code data or the like are loaded into a RAM (Random Access Memory) from a NAND flash memory, and the data are read out by the host system.
However, a NAND flash memory does not have a protecting function for each block like a NOR flash memory. Because of this, there is a problem that data might be rewritten in accordance with a false rewrite instruction sent from the outside. Also, in a case where a protection storing unit for setting rewrite protection information is employed as in a NOR flash memory, the circuit size becomes larger.